MDEV-37316#5073
Draft
ParadoxV5 wants to merge 6 commits into
Draft
Conversation
To prepare for MDEV-37321, this commit moves them to a
`Remote_event_stream` class outside of `sql/`.
The `.cc` file will switch to Connector/C unbeknownst to `rpl_mi.cc`.
Only the following steps are reörganized to reusable instance methods:
* Connection setup and startup
* VIO management
* Abort when the thread is killed
* Closing
(already covered by Connector/C, but not by the current `libmysql`)
The following steps are currently not öptimal for moving
(have verbose changesets), so they are only wrapped, not reörganized:
* steps that run queries *with copy-pasted code*
* sending commands `COM_REGISTER_SLAVE` & `COM_BINLOG_DUMP`,
including serializing their arguments
* Connector/C does not have a formal API for serializing
command arguments, especially variable-length strings.
* Connector/C has a Binlog API that duplicates this step, but that
API is not modular for the Server’s full replication capabilities.
* error checking
These require refactors and ideally an evaluation for `mariadb-binlog`.
To enable this migration, this commit additionally:
* Reserves the management of the IO thread’s VIO to the client library
* Draft-specific: omits MDEV-28114’s kludge failure
recovery for Semi-Sync graceful self-KILL since
* MDEV-32551 fixed the root bug on the ACK receiver, and
* MDEV-39583 plans to remove this entire sub-component.
Draft-specific: Until Connector/C exports the pre-decompress (network)
byte count, `@@read_binlog_speed_limit` will measure the post-decompress
count even in `@@slave_compressed_protocol` for now.
Compile `rpl/` separately from the rest of the server (`sql/`), so it can specify linking to Connector/C instead of `sql-common/`. `mariadb_capi_rename.h` had to add a lot of symbols to resolve multiple-definition errors with the addition of Connector/C. While linking to the dynamic library instead of a static compile could hide the ODR violations, running the server can still select the wrong version and result in surprises. This phenomenon affects not only this commit, but also plugins that link to Connector/C themselves.
Contributor
Author
|
Okay, does CI for some genius reason not use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just a draft/preview that also serves as CI upload and backup; not final yet, not even close…
What problem is the patch trying to solve?
If some output changed that is not visible in a test case, what was it looking like before the change and how it's looking with this patch applied?
Do you think this patch might introduce side-effects in other parts of the server?
Anything from release notes?